//
//  EllipsisView.m
//  代码布局
//
//  Created by iOS on 16/8/2.
//  Copyright © 2016年 iOS. All rights reserved.
//

#import "EllipsisView.h"

@implementation EllipsisView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
     //   [self createElliosisView:frame];
      //  self.backgroundColor = [UIColor yellowColor];
    }
    return self;
}

- (void)createElliosisView:(CGSize)frame{
    for (NSInteger i = 0; i<3; i++) {
        CALayer * layer = [[CALayer alloc]init];
      //  layer.frame = CGRectMake(i*(frame.size.width/4.0) +(frame.size.width/4.0 * 0.5) *(i+1) , 0, frame.size.width/4.0, frame.size.width/4.0);
         layer.frame = CGRectMake(i*(frame.width/4.0) +(frame.width/4.0 * 0.5) *(i+1) , 0, frame.width/4.0, frame.width/4.0);
        [layer setMasksToBounds:YES];
        [layer setCornerRadius:frame.width/8.0];
        [self.layer addSublayer:layer];
        
        
        
        
        layer.backgroundColor = [UIColor darkGrayColor].CGColor;
        
    }
}
- (void)setReloads:(CGSize)reloads{
    _reloads = reloads;
   [self createElliosisView:reloads];
}
@end
